import login from "./components/login/login.vue"
import waiter from "./views/waiter/waiter.vue"
import manager from "./views/manager/manager.vue"
import cooker from "./views/cooker/cooker.vue"
import welcome from "./components/welcome.vue"
import choose from "./components/waiter/choose.vue"
import order from "./components/waiter/order.vue"
import tip from "./components/waiter/tip.vue"
import modify from "./components/waiter/modify.vue"
import register from "./components/register/register.vue"
import customer from "./views/customer/customer.vue"
import customer_menu from "./components/customer/customer_menu.vue"
import unfinished_booking from "./components/customer/unfinished_booking.vue"
import finished_booking from "./components/customer/finished_booking.vue"
import change_password from "./components/customer/change_password.vue"
import pay from "./components/customer/pay.vue"
import cookmanager from "./components/manager/cookmanager.vue"
import frontermanager from "./components/manager/frontermanager.vue"
import waitermanager from "./components/manager/waitermanager.vue"
import cook_modify from "./components/cooker/cook_modify.vue"
import cook_tip from "./components/cooker/cook_tip.vue"
import fronter from "./views/fronter/fronter.vue"
import ordermanager from "./components/fronter/ordermanager.vue"
import menumanager from "./components/fronter/menumanager.vue"
import cook_interface from "./components/cooker/cook_interface.vue"
import cook_order from "./components/cooker/cook_order.vue"
import waiter_info from"./components/fronter/waiter_info.vue"
import fronter_info from"./components/fronter/fronter_info.vue"
import cooker_info from"./components/fronter/cooker_info.vue"



var routes = [
    {
        path:"/",
        redirect:"/login"
    },
    {
        path: "/login",
        component: login,
    },
    {
        path:"/waiter",
        component:waiter,
        redirect:"/waiter/welcome",
        children:[
            {
                path:"/waiter/welcome",
                component:welcome
            },
            {
                path:"/choose",
                component:choose
            },
            {
                path:"/order",
                component:order
            },
            {
                path:"/tip",
                component:tip
            },
            {
                path:"/modify",
                component:modify
            }
        ]
    },
    {
        path:"/manager",
        component:manager,
        redirect:"/manager/welcome",
        children:[
            {
                path:"/manager/welcome",
                component:welcome
            },
            {
                path:"/cookmanager",
                component:cookmanager
            },
            {
                path:"/frontermanager",
                component:frontermanager
            },
            {
                path:"/waitermanager",
                component:waitermanager
            }
        ]
    },
    {
        path:"/cooker",
        component:cooker,
        redirect:"/cooker/welcome",
        children:[
            {
                path:"/cooker/welcome",
                component:welcome
            },
            {
                path:"/cook_modify",
                component:cook_modify
            },
            {
                path:"/cook_tip",
                component:cook_tip
            },
            {
                path:"/cook_interface",
                component:cook_interface
            },
            {
                path:"/cook_order",
                component:cook_order
            }
        ]
    },
    {
        path:"/register",
        component:register
    },
    {
        path:"/customer",
        component:customer,
        redirect:"/customer/welcome",
        children:[
            {
                path:"/customer/welcome",
                component:welcome
            },
            {
                path:"/customer_menu",
                component:customer_menu
            },
            {
                path:"/finished_booking",
                component:finished_booking
            },
            {
                path:"/unfinished_booking",
                component:unfinished_booking
            },
            {
                path:"/change_password",
                component:change_password
            },
            {
                path:"/pay",
                component:pay
            }
        ]
    },
    {
        path:"/fronter",
        component:fronter,
        redirect:"/fronter/welcome",
        children:[
            {
                path:"/fronter/welcome",
                component:welcome
            },
            {
                path:"/ordermanager",
                component:ordermanager
            },
            {
                path:"/menumanager",
                component:menumanager,
            },
            {
                path:"/waiter_info",
                component:waiter_info
            },
            {
                path:"/fronter_info",
                component:fronter_info
            },
            {
                path:"/cooker_info",
                component:cooker_info
            }
        ]
    }
];

export {routes}